console.log("完整的URL地址:" + location.href); 
	console.log("协议:" + location.protocol); 
	console.log("ip地址和端口号:" + location.host);
	console.log("ip地址:" + location.hostname);
 	console.log("端口号:" + location.port); 
 	console.log("完整资源路径:" + location.pathname);
  	console.log("搜索内容:" + location.search); 
  	console.log("锚部分:" + location.hash);
  function doReload(){
    location.reload();
  }
  function doAssign(){
  	location.assign("http://www.baidu.com");
  }
  function toBaidu(){
    location.replace('http://www.baidu.com');
  }